function y = tax_T3(x,x2)
%x = endowment
%x2 = interest income
global z
%TAX returns the amount of income taxes for an ordinary income x and
%interest income x2
%for T3 only
y=zeros(size(x));
y(x>21)=0.1*(x(x>21)-21);
y(x>39)=0.15*(x(x>39)-39)+1.8;
y(x>96)=0.25*(x(x>96)-96)+10.35;
y=y+x2*z;
end

